package com.shaw.running.plugins;

import com.shaw.mybatisx.annotation.Interceptors;
import com.shaw.mybatisx.annotation.Signature;
import com.shaw.mybatisx.executor.Executor;
import com.shaw.mybatisx.plugin.Interceptor;
import com.shaw.mybatisx.plugin.Invocation;
import com.shaw.mybatisx.proxy.PluginProxy;
import com.shaw.mybatisx.session.Configuration;

/**
 * Created by asus on 2018/4/11.
 */
@Interceptors({@Signature(type = Executor.class,
                           method = "query",
                           args = {Configuration.MapperDate.class,Object.class}
                )})
public class Plugins3 implements Interceptor {
    @Override
    public Object intercept(Invocation invocation) {
        System.out.println("------------------->intercpetor3");
       return invocation.proceed();

    }

    @Override
    public Object plugin(Object target) {
        return PluginProxy.warp(target,this);
    }
}
